#!/bin/sh -e

mk() {
    make \
        PREFIX=/usr \
        MANPREFIX=/usr/share/man \
        CFLAGS="$CFLAGS -static" \
        "$@"
}

mk
mk DESTDIR="$1" install
clsv -d "$1" scron.run

mv "$1/usr/bin/crond" "$1/usr/bin/scrond"
ln -s scrond "$1/usr/bin/crond"
